package com.gtw.modules.api.controller;

import com.gtw.common.annotation.AuthIgnoreApi;
import com.gtw.common.utils.R;
import com.gtw.modules.entity.TbProxyFavorable;
import com.gtw.modules.sys.service.TbProxyFavorableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/** 代理进货优惠controller
 *
 * @author wuye
 * @date 2018/3/29
 */
@RestController
@RequestMapping("/api/proxyfavorable")
public class SysProxyFavorableController {

    @Autowired
    private TbProxyFavorableService tbProxyFavorableService;


    /**
     * 查询所有代理进货优惠
     * @return
     */
    @AuthIgnoreApi
    @GetMapping("/queryList")
    public R queryList(){
        List<TbProxyFavorable> list = tbProxyFavorableService.queryAll();
        return R.ok().put("data",list);
    }
}
